package packet1;

import java.util.*;

public class cade {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int packet[] = new int[n];
        int sum = 0;
        for (int i = 0; i < n; i++) {
            packet[i] = sc.nextInt();
            sum += packet[i];
        }
        if(sum %2 != 0)
        {
            System.out.println(0);
            return;
        }
        isOk(packet,sum);
    }
    public static void isOk(int[] packet, int sum){
        int target = sum/2;
        int dp[] = new int[target + 1];
        Set<Integer> list1 = new HashSet<>();
        for (int i = 0; i < packet.length; i++) {
            for (int j = target; j >= packet[i] ; j--) {
                if(dp[j] >= dp[j - packet[i]] + packet[i])
                {
                    dp[j] = dp[j];

                }
                else
                {
                    dp[j] = dp[j - packet[i]] + packet[i];
                    list1.add(i);
                }
            }
        }
        if(target != dp[target])
        {
            System.out.println(0);
            return;
        }
        else{
            System.out.println(target);
            for(int i : list1){
                System.out.print(packet[i] + " ");
            }

            //List<Integer> list2 = new ArrayList<>();

        }
    }
}
/*
5
7 4 5 3 3
 */